﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_Sys_ExamPlace 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_Sys_ExamPlace : Entity
    {
        public TB_Sys_ExamPlace() : base("TB_Sys_ExamPlace")
        {
        }

        #region Model
        private string _ExamPlaceNO;
        private string _ExamPlaceName;
        private string _IsActive;
        private string _ExamYear;
        private string _Address;
        private string _ExamProvince;
        /// <summary>
        /// 考点编号
        /// </summary>
        public string ExamPlaceNO
        {
            get { return _ExamPlaceNO; }
            set
            {
                this.OnPropertyValueChange(_.ExamPlaceNO, _ExamPlaceNO, value);
                this._ExamPlaceNO = value;
            }
        }
        /// <summary>
        /// 考点名称
        /// </summary>
        public string ExamPlaceName
        {
            get { return _ExamPlaceName; }
            set
            {
                this.OnPropertyValueChange(_.ExamPlaceName, _ExamPlaceName, value);
                this._ExamPlaceName = value;
            }
        }
        /// <summary>
        /// 是否有效（1：开启   0：关闭）
        /// </summary>
        public string IsActive
        {
            get { return _IsActive; }
            set
            {
                this.OnPropertyValueChange(_.IsActive, _IsActive, value);
                this._IsActive = value;
            }
        }
        /// <summary>
        /// 考试年度
        /// </summary>
        public string ExamYear
        {
            get { return _ExamYear; }
            set
            {
                this.OnPropertyValueChange(_.ExamYear, _ExamYear, value);
                this._ExamYear = value;
            }
        }
        /// <summary>
        /// 考点地址
        /// </summary>
        public string Address
        {
            get { return _Address; }
            set
            {
                this.OnPropertyValueChange(_.Address, _Address, value);
                this._Address = value;
            }
        }
        /// <summary>
        /// 考点省份
        /// </summary>
        public string ExamProvince
        {
            get { return _ExamProvince; }
            set
            {
                this.OnPropertyValueChange(_.ExamProvince, _ExamProvince, value);
                this._ExamProvince = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.ExamPlaceNO};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.ExamPlaceNO,
				_.ExamPlaceName,
				_.IsActive,
				_.ExamYear,
				_.Address,
				_.ExamProvince};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._ExamPlaceNO,
				this._ExamPlaceName,
				this._IsActive,
				this._ExamYear,
				this._Address,
				this._ExamProvince};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ExamPlaceNO = DataUtils.ConvertValue<string>(reader["ExamPlaceNO"]);
            this._ExamPlaceName = DataUtils.ConvertValue<string>(reader["ExamPlaceName"]);
            this._IsActive = DataUtils.ConvertValue<string>(reader["IsActive"]);
            this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
            this._Address = DataUtils.ConvertValue<string>(reader["Address"]);
            this._ExamProvince = DataUtils.ConvertValue<string>(reader["ExamProvince"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ExamPlaceNO = DataUtils.ConvertValue<string>(row["ExamPlaceNO"]);
            this._ExamPlaceName = DataUtils.ConvertValue<string>(row["ExamPlaceName"]);
            this._IsActive = DataUtils.ConvertValue<string>(row["IsActive"]);
            this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
            this._Address = DataUtils.ConvertValue<string>(row["Address"]);
            this._ExamProvince = DataUtils.ConvertValue<string>(row["ExamProvince"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Sys_ExamPlace");
            /// <summary>
            /// 考点编号
            /// </summary>
            public readonly static Field ExamPlaceNO = new Field("ExamPlaceNO", "TB_Sys_ExamPlace", "考点编号");
            /// <summary>
            /// 考点名称
            /// </summary>
            public readonly static Field ExamPlaceName = new Field("ExamPlaceName", "TB_Sys_ExamPlace", "考点名称");
            /// <summary>
            /// 是否有效（1：开启   0：关闭）
            /// </summary>
            public readonly static Field IsActive = new Field("IsActive", "TB_Sys_ExamPlace", "是否有效（1：开启   0：关闭）");
            /// <summary>
            /// 考试年度
            /// </summary>
            public readonly static Field ExamYear = new Field("ExamYear", "TB_Sys_ExamPlace", "考试年度");
            /// <summary>
            /// 考点地址
            /// </summary>
            public readonly static Field Address = new Field("Address", "TB_Sys_ExamPlace", "考点地址");
            /// <summary>
            /// 考点省份
            /// </summary>
            public readonly static Field ExamProvince = new Field("ExamProvince", "TB_Sys_ExamPlace", "考点省份");
        }
        #endregion


    }
}

